<!--策略启动-自定义-->
<template>
  <div class="bg" @viewappear="viewappear" @viewdisappear="viewdisappear">
    
    <VSubMenuOval class="menu" :menus="menus" :menu="menu" @menuClick="menuClick" />

    <SignalListV ref="SignalListV" v-if="menu==0" />
    <SignalListT ref="SignalListT" v-else />
  </div>
</template>

<script>

//组件

//功能
import jconfig from "@/_js/config";

const weexFunction = weex.requireModule('WeexFunction');

import I18N from "@/_i18n/i18n";
var T = I18N.t;

import VSubMenuOval from '@/_public/VSubMenuOval.vue'
import SignalListV from "./view/SignalListV"
import SignalListT from "./view/SignalListT"
export default {

  components: {
    VSubMenuOval,
    SignalListV,
    SignalListT,
  },
  
  data() {
    return {
      T:T,
      Config: jconfig,

      menus:[T('Vtrading信号'), T('TradingView自定义')],
      menu:0,
    };
  },

  mounted() {
  },
  
  methods: {
    /************************************************* 通信触发*/
    //完全显示
    viewappear() {
      this.$refs.SignalListV && this.$refs.SignalListV.viewappear();
      this.$refs.SignalListT && this.$refs.SignalListT.viewappear();
    },

    //完全隐藏
    viewdisappear() {
      this.$refs.SignalListV && this.$refs.SignalListV.viewdisappear();
      this.$refs.SignalListT && this.$refs.SignalListT.viewdisappear();
    },

    /********************************** 点击*/
    //菜单点击
    menuClick(menu){
      if (this.menu == menu) return;
      this.menu = menu;
    },

  }
}
</script>

<style src="@/_css/style.css" ></style>
<style scoped>
.bg {
  width: 750px;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}
.menu {
  margin-top: 20px;
  margin-left: 40px;
}
</style>